projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a8fb66
)
On one of pyxc_domain_getinfo's error paths, free the block allocated
author
emellor@ewan
<emellor@ewan>
Wed, 21 Sep 2005 10:24:26 +0000
(11:24 +0100)
committer
emellor@ewan
<emellor@ewan>
Wed, 21 Sep 2005 10:24:26 +0000
(11:24 +0100)
previously. This would have caused a memory leak when attempting to get info
on a domain that does not exist.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/lowlevel/xc/xc.c
patch
|
blob
|
history
diff --git
a/tools/python/xen/lowlevel/xc/xc.c
b/tools/python/xen/lowlevel/xc/xc.c
index d7452fabd13caf252e1495444be42667ee098662..ef4c58d3e959ec90f1a43b56e0dec95980cb7652 100644
(file)
--- a/
tools/python/xen/lowlevel/xc/xc.c
+++ b/
tools/python/xen/lowlevel/xc/xc.c
@@
-222,8
+222,11
@@
static PyObject *pyxc_domain_getinfo(PyObject *self,
nr_doms = xc_domain_getinfo(xc->xc_handle, first_dom, max_doms, info);
if (nr_doms < 0)
+ {
+ free(info);
return PyErr_SetFromErrno(xc_error);
-
+ }
+
list = PyList_New(nr_doms);
for ( i = 0 ; i < nr_doms; i++ )
{